<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        /**
         * replace：可传入字符串或正则表达式，但只替换第一个匹配到的字符串
        */
       const str = 'qwertyuiopoiuytrewq'

       console.log(str.replace('q', 'qqqqqq'));
       console.log(str.replace(/q/g, 'qqqqqq'));
    </script>
</body>
</html>